package com.zr.inquiry.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * Created by Hasee on 2019/10/9.
 */
@Data
public class InquiryUpdateVo {
    @NotNull(message = "Id不能为空！")
    private Integer id;
    @NotNull(message = "币别不能为空！")
    private Integer currencyCode;
    @NotNull(message = "询价状态不能为空！")
    private Integer inquiryStatus;
    @NotNull(message = "法人Id不能为空！")
    private Integer legalPersonId;
    @NotNull(message = "询价类型不能为空！")
    private Integer type;
    @NotNull(message = "是否含税不能为空！")
    private Integer isTax;
    @NotNull(message = "有效开始时间不能为空！")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date startTime;
    @NotNull(message = "有效结束时间不能为空！")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date endTime;
    @NotEmpty(message = "备件明细不能为空！")
    @Valid
    private List<Inquirysparedetail> inquirysparedetailList;//备件明细
    @NotEmpty(message = "供应商明细不能为空！")
    @Valid
    private List<Inquirysupplierdetail> inquirysupplierdetailList;//供应商明细

}
